require File.dirname(__FILE__) + '/../source/dir_builder'

hierarchy = [
  [ 'testdir', nil ],
  [ 'testdir/abc', 'abc' ],
  [ 'testdir/def', 'def' ],
  [ 'testdir/sub', nil ],
  [ 'testdir/sub/abc', 'abc' ],
  [ 'testdir/sub/def', 'def' ],
  [ 'anotherTestDir', nil ],
  [ 'anotherTestDir/abc', 'xyz' ],
  [ 'anotherTestDir/sub', nil ],
  [ 'anotherTestDir/sub/abc', 'abc' ],
  [ 'anotherTestDir/sub/def', 'ghi' ],
  [ 'ext_testdir', nil ],
  [ 'ext_testdir/abc', 'abc' ],
  [ 'ext_testdir/abc.ext', 'abc' ],
  [ 'ext_testdir/def', 'def' ],
  [ 'ext_testdir/sub', nil ],
  [ 'ext_testdir/sub/abc', 'abc' ],
  [ 'ext_testdir/sub/abc.ext', 'abc' ],
  [ 'ext_testdir/sub/def', 'def' ],
  [ 'basename_testdir', nil ],
  [ 'basename_testdir/abc.txt', '123' ],
  [ 'basename_testdir/abc.wpd', '456' ],
]

@db = DirBuilder.new(hierarchy)
@db.build